﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<ThanhCongJSC.Models.Content>>" %>
<%@ Import Namespace="ThanhCongJSC.Helper"%>

<table border="1px" cellpadding="5" cellspacing="0" width="100%">
        <tr>
            <th width="5%" class="header"><input type="checkbox" id="check-all" name="check-all" /></th>
            <th width="35%" class="header">Tiêu đề</th>
            <th width="20%" class="header">Ngày đăng</th>
            <th width="20%" class="header">Hình ảnh</th>
            <th width="20%" class="header">Thao tác</th>
        </tr>
        <tbody>
            <% foreach (var item in Model)
               { %>
                <tr>
                    <td align="center"><input type="checkbox" id="check-1" name="check-one" /></td>
                    <td><%= item.Title %></td>
                    <td><%= item.PublishDate.Value.ToShortDateString() ?? DateTime.Now.ToShortDateString()%></td>
                    <td><img alt="hinh anh" src="<%= Url.Content(Constant.PathImageTinTuc + item.ContentImage ?? string.Empty) %>" width="160px" height="80px" /></td>
                    <td>Sửa | Xóa</td>
                </tr>
            <% } %>
        </tbody>
</table>